package com.example.demo.widget.chart.broken

import android.support.annotation.IntRange
import java.lang.Integer.max

/**
 * 折线图数据
 *
 * @author wangheng
 */
class ChartBrokenLineData(val list: ArrayList<ChartBrokenLinePoint>,@IntRange(from = 1,to = 100) val countOfYAxis: Int = 5) {
    fun getMaxValue(): Int{
        return list.fold(0){result,item ->
            if(result > item.value){
                result
            }else{
                item.value
            }
        }
    }
}